/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package umat.beans;

import dbcontrollers.MainController;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Tudor
 */
@ManagedBean(name = "User")
@RequestScoped
public class User {
    private String user;
    private String password;
    /** Creates a new instance of User */
    public User() {
    }

    public User(String user, String password) {
        this.user = user;
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }
    
    public void addUser(){
        MainController.getInstance().addUser(user, password, 1);
    }
}
